﻿<Window x:Class="ProductKeyManager.Settings"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:ProductKeyManager" 
    xmlns:ui="clr-namespace:ProductKeyManager.UI"
    Title="Settings" Height="400" Width="400" Loaded="Window_Loaded">
    <Window.Resources>
        <Style TargetType="{x:Type Slider}">
            <Setter Property="Maximum" Value="1"/>
            <Setter Property="Minimum" Value="0"/>
            <Setter Property="TickFrequency" Value=".05"/>
            <Setter Property="TickPlacement" Value="BottomRight"/>
            <Setter Property="IsSnapToTickEnabled" Value="True"/>
            <Setter Property="IsMoveToPointEnabled" Value="True"/>
        </Style>
    </Window.Resources>
    <ScrollViewer>
        <DockPanel>
            <ToolBarTray IsLocked="True" DockPanel.Dock="Bottom">
                <ToolBar DockPanel.Dock="Right">
                    <Button Margin="2" Name="SettingsOk" Width="50" Click="SettingsOk_Click">Ok</Button>
                    <Button Margin="2" Name="SettingsCancel" Click="SettingsCancel_Click" Width="50">Cancel</Button>
                    <Button Margin="2" Name="SettingsApply" Click="SettingsApply_Click" Width="50">Apply</Button>
                </ToolBar>
            </ToolBarTray>
            <StackPanel>
                <GroupBox Header="General">
                    <StackPanel>
                        <CheckBox Margin="4" Name="chkSaveLastSearch">Save Last Search</CheckBox>
                        <CheckBox Margin="4" Name="chkLockToolbars">Lock Toolbars</CheckBox>
                        <CheckBox Margin="4" Name="chkEnableXsl" Checked="chkEnableXsl_Checked" Unchecked="chkEnableXsl_Checked">Enable XSL Stylesheets on export</CheckBox>
                        <CheckBox Name="chkXslPrompt" Margin="16, 4, 4, 4">Prompt to use XSL</CheckBox>
                        <TextBlock>
                            <Label Content="Default search similarity minimum:"/>
                            <Label Name="lblCurrentSetting"/>
                        </TextBlock>
                        <Slider Name="sldSearchMinimum" ValueChanged="sldSearchMinimum_ValueChanged" />
                    </StackPanel>
                </GroupBox>
                <GroupBox Header="Data Layer" IsEnabled="False">
                    <StackPanel>
                        <Label Content="Connection String:"/>
                        <TextBox Name="mConnectionString"/>
                        <Button Width="75" IsEnabled="False">
                            <StackPanel Orientation="Horizontal">
                                <Image Source="Icons/UAC_shield.ico" Width="16" Height="16"/>
                                <Label>Change</Label>
                            </StackPanel>
                        </Button>
                    </StackPanel>
                </GroupBox>
                <GroupBox Header="Log" IsEnabled="True">
                    <StackPanel>
                        <Label Content="Log File Location:"/>
                        <TextBox Name="mLogFile"/>
                    </StackPanel>
                </GroupBox>
            </StackPanel>
        </DockPanel>
    </ScrollViewer>
</Window>
